package com.svs.quartz.helper;

import com.svs.common.utils.data.entity.DbType;

public class WisDataSourceHelper {

	public static final String DIALECT_MYSQL = "mysql" ;
	public static final String DIALECT_SQLSERVER = "sqlserver" ;
	public static final String DIALECT_ORACLE = "oracle" ;
	
	public static Dialect getDialect(String dialect) {
		Dialect result = Dialect.MySQL ;
		if(DIALECT_SQLSERVER.equals(dialect)) {
			result = Dialect.SQLSERVER ;
		}
		if(DIALECT_ORACLE.equals(dialect)) {
			result = Dialect.ORACLE ;
		}
		return result ;
	}
	
	
	public static DbType getDbType(String dialect) {
		DbType result = DbType.MySQL ;
		if(DIALECT_SQLSERVER.equals(dialect)) {
			result = DbType.SQLSERVER ;
		}
		if(DIALECT_ORACLE.equals(dialect)) {
			result = DbType.ORACLE ;
		}
		return result ;
	}
}
